import request from '@/utils/request'
// 获取权限
export function getPermissonList() {
  return request({
    url: '/sys/permission'
  })
}
// 添加权限
export function addPermissonList(data) {
  return request({
    url: '/sys/permission',
    method: 'post',
    data
  })
}

// 根据 id 获取权限详情
export function getPermissonDetail(id) {
  return request({
    url: `/sys/permission/${id}`
  })
}

// 编辑权限
export function uploadPermisson(data) {
  return request({
    url: `/sys/permission/${data.id}`,
    method: 'put',
    data
  })
}

// 删除 权限
export function delPermisson(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'delete'
  })
}
